home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Libraries / usr (gcc 1.37 libs) / mac / dup2.c < prev    next >
C/C++ Source or Header  |  1993-12-08  |  155b  |  10 lines

  1. #include "crtlocal.h"
  2.  
  3. int dup2(int fd1, int fd2)
  4.     {
  5.     mysleep(1);
  6.     if (crt_fd_tab[fd2].fd) close(fd2);
  7.     crt_fd_tab[fd2] = crt_fd_tab[fd1];
  8.     return fd2;
  9.     }
  10.